package Vista.menu;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;

import Controlador.ControlJugar;
import Controlador.ControlVerRanking;

public class VistaMenuInicial {
	
	public void dibujar(){
		
		JFrame frame = new JFrame("GPS Challenge");
		frame.setVisible(true);
		frame.setSize(400,300);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);			
		frame.getContentPane().setLayout(null);
		
		JLabel gps = new JLabel("GPS CHALLENGE");
		gps.setBounds(130, 0, 150, 80);
		frame.getContentPane().add(gps);
		
		JButton jugar = new JButton("Jugar");
		jugar.setBounds(30,110,130,50);
		frame.getContentPane().add(jugar);
		jugar.addActionListener(new ControlJugar(frame));
		
		JButton rank = new JButton("Ver ranking");
		rank.setBounds(200, 110, 130, 50);
		frame.getContentPane().add(rank);
		rank.addActionListener(new ControlVerRanking(frame));
		
	}
}
